<html>
<head>
<title>Docs For Class XMLbridge</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">o2xml2o</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
        
                                    
                              		  [ <a href="../classtrees_o2xml2o.html" class="menu">class tree: o2xml2o</a> ]
		  [ <a href="../elementindex_o2xml2o.html" class="menu">index: o2xml2o</a> ]
		  	    [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
      <b>Packages:</b><br />
              <a href="../li_o2xml2o.html">o2xml2o</a><br />
            <br /><br />
                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../o2xml2o/_XMLbridge.php.html">		XMLbridge.php
		</a><br>
			<a href="../o2xml2o/_XMLserializer.php.html">		XMLserializer.php
		</a><br>
	  </div><br />
      
      
            <b>Classes:</b><br />
        <div class="package">
		    		<a href="../o2xml2o/XMLbridge.html">XMLbridge</a><br />
	    		<a href="../o2xml2o/XMLserializer.html">XMLserializer</a><br />
	  </div>
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Class: XMLbridge</h1>
Source Location: /XMLbridge.php<br /><br />


<table width="100%" border="0">
<tr><td valign="top">

<h3><a href="#class_details">Class Overview</a></h3>
<pre></pre><br />
<div class="description">This class allows any child class to be exported into an XML structure or  allows it to import its attributes' values from a previously exported  XML file.</div><br /><br />
<h4>Author(s):</h4>
<ul>
          <li>Dennis Cohn Muroy</li>
                              </ul>




        
          
          
<h4>Version:</h4>
<ul>
  <li>0.9</li>
</ul>

<h4>Copyright:</h4>
<ul>
  <li>Copyright (c) 2010, Dennis Cohn Muroy</li>
</ul>
        
</td>


<td valign="top">
<h3><a href="#class_consts">Constants</a></h3>
<ul>
    <li><a href="../o2xml2o/XMLbridge.html#constCLOSE_TAG">CLOSE_TAG</a></li>
    <li><a href="../o2xml2o/XMLbridge.html#constOPEN_TAG">OPEN_TAG</a></li>
  </ul>
</td>

<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
    <li><a href="../o2xml2o/XMLbridge.html#methodprintArray">printArray</a></li>
    <li><a href="../o2xml2o/XMLbridge.html#methodprintElements">printElements</a></li>
    <li><a href="../o2xml2o/XMLbridge.html#methodprintObject">printObject</a></li>
    <li><a href="../o2xml2o/XMLbridge.html#methodprintValue">printValue</a></li>
    <li><a href="../o2xml2o/XMLbridge.html#methodreadArrayStructure">readArrayStructure</a></li>
    <li><a href="../o2xml2o/XMLbridge.html#methodreadElement">readElement</a></li>
    <li><a href="../o2xml2o/XMLbridge.html#methodreadStructure">readStructure</a></li>
    <li><a href="../o2xml2o/XMLbridge.html#methodreadXML">readXML</a></li>
    <li><a href="../o2xml2o/XMLbridge.html#methodwriteXML">writeXML</a></li>
  </ul>
</td>

</tr></table>
<hr />

<table width="100%" border="0"><tr>






</tr></table>
<hr />

<a name="class_details"></a>
<h3>Class Details</h3>
<div class="tags">
[line 35]<br />
This class allows any child class to be exported into an XML structure or  allows it to import its attributes' values from a previously exported  XML file.<br /><br /><p>This class is the XML bridge for your objects!!!</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>author:</b>&nbsp;&nbsp;</td><td>Dennis Cohn Muroy</td>
  </tr>
  <tr>
    <td><b>version:</b>&nbsp;&nbsp;</td><td>0.9</td>
  </tr>
  <tr>
    <td><b>copyright:</b>&nbsp;&nbsp;</td><td>Copyright (c) 2010, Dennis Cohn Muroy</td>
  </tr>
  <tr>
    <td><b>abstract:</b>&nbsp;&nbsp;</td><td></td>
  </tr>
  <tr>
    <td><b>license:</b>&nbsp;&nbsp;</td><td><a href="http://opensource.org/licenses/gpl-3.0.html">GNU Public License 3</a></td>
  </tr>
</table>
</div>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />


<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">

  <hr />
	<a name="methodprintArray"></a>
	<h3>method printArray <span class="smalllinenumber">[line 102]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void printArray(
array
$array, string
$attributeName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Exports a list of elements to XML<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>author:</b>&nbsp;&nbsp;</td><td>Dennis Cohn Muroy</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>private</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">array&nbsp;&nbsp;</td>
        <td><b>$array</b>&nbsp;&nbsp;</td>
        <td>List of elements to be exported to XML.  These  elements can be Objects, arrays or basic datatypes.</td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$attributeName</b>&nbsp;&nbsp;</td>
        <td>Name of the attribute where the $value is  assigned.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodprintElements"></a>
	<h3>method printElements <span class="smalllinenumber">[line 46]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void printElements(
array
$elements)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Exports a list of elements into XML<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>author:</b>&nbsp;&nbsp;</td><td>Dennis Cohn Muroy</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>private</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">array&nbsp;&nbsp;</td>
        <td><b>$elements</b>&nbsp;&nbsp;</td>
        <td>List of elements to be exported into XML</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodprintObject"></a>
	<h3>method printObject <span class="smalllinenumber">[line 68]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void printObject(
Object
$object, string
$attributeName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Exports an object into a XML Structure<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>author:</b>&nbsp;&nbsp;</td><td>Dennis Cohn Muroy</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>private</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Object&nbsp;&nbsp;</td>
        <td><b>$object</b>&nbsp;&nbsp;</td>
        <td>Object to be exported to XML</td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$attributeName</b>&nbsp;&nbsp;</td>
        <td>Name of the attribute where the $object is  assigned.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodprintValue"></a>
	<h3>method printValue <span class="smalllinenumber">[line 85]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void printValue(
string|integer|boolean
$value, string
$attributeName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Writes the value of a XML node.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>author:</b>&nbsp;&nbsp;</td><td>Dennis Cohn Muroy</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>private</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string|integer|boolean&nbsp;&nbsp;</td>
        <td><b>$value</b>&nbsp;&nbsp;</td>
        <td>Value to be exported to a XML node</td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$attributeName</b>&nbsp;&nbsp;</td>
        <td>Name of the attribute where the $value is  assigned.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodreadArrayStructure"></a>
	<h3>method readArrayStructure <span class="smalllinenumber">[line 144]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>array readArrayStructure(
SimpleXMLElement
$node)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		This function loads values of the node into an array.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>author:</b>&nbsp;&nbsp;</td><td>Dennis Cohn Muroy</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>private</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">SimpleXMLElement&nbsp;&nbsp;</td>
        <td><b>$node</b>&nbsp;&nbsp;</td>
        <td>Node of the XML Structure</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodreadElement"></a>
	<h3>method readElement <span class="smalllinenumber">[line 121]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>mixed readElement(
mixed
$element, string
$type, string
$class)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Returns the value that will be assigned to the object attribute<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>Value to be assigned to an object attribute.</td>
  </tr>
  <tr>
    <td><b>author:</b>&nbsp;&nbsp;</td><td>Dennis Cohn Muroy</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>private</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">mixed&nbsp;&nbsp;</td>
        <td><b>$element</b>&nbsp;&nbsp;</td>
        <td>Element that will be imported from XML into an  Object, Array or Basic Datatype variable.</td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$type</b>&nbsp;&nbsp;</td>
        <td>Indicates if the $element is an Object, an Array or  a basic datatype.</td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$class</b>&nbsp;&nbsp;</td>
        <td>Class of the object that was previously exported  into XML.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodreadStructure"></a>
	<h3>method readStructure <span class="smalllinenumber">[line 164]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void readStructure(
SimpleXMLElement
$node)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		This function loads values of the node into the object's attributes.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>author:</b>&nbsp;&nbsp;</td><td>Dennis Cohn Muroy</td>
  </tr>
  <tr>
    <td><b>final:</b>&nbsp;&nbsp;</td><td></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">SimpleXMLElement&nbsp;&nbsp;</td>
        <td><b>$node</b>&nbsp;&nbsp;</td>
        <td>Node of the XML Structure</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodreadXML"></a>
	<h3>method readXML <span class="smalllinenumber">[line 183]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void readXML(
string
$file)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		This is the method that must be called in order to convert an XML  structure into an object that extends the XMLbridge class.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>author:</b>&nbsp;&nbsp;</td><td>Dennis Cohn Muroy</td>
  </tr>
  <tr>
    <td><b>final:</b>&nbsp;&nbsp;</td><td></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$file</b>&nbsp;&nbsp;</td>
        <td>File or url that contains to the XML Structure.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodwriteXML"></a>
	<h3>method writeXML <span class="smalllinenumber">[line 203]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void writeXML(
)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		This is the method that must be called in order to export the child object  into an XML structure.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>author:</b>&nbsp;&nbsp;</td><td>Dennis Cohn Muroy</td>
  </tr>
  <tr>
    <td><b>final:</b>&nbsp;&nbsp;</td><td></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
</div><br />

<hr />
<a name="class_constss"></a>
<h3>Class Constants</h3>
<div class="tags">
	<a name="constCLOSE_TAG"></a>
	<p></p>
	<h4>CLOSE_TAG = <span class="value">&nbsp;&quot;&lt;/element&gt;\n&quot;</span></h4>
	<p>[line 38]</p>
  
  <br />
	<div class="top">[ <a href="#top">Top</a> ]</div><br />
	<a name="constOPEN_TAG"></a>
	<p></p>
	<h4>OPEN_TAG = <span class="value">&nbsp;&quot;&lt;element&nbsp;name=\&quot;%s\&quot;&nbsp;type=\&quot;%s\&quot;&nbsp;class=\&quot;%s\&quot;&gt;\n&quot;</span></h4>
	<p>[line 37]</p>
  
  <br />
	<div class="top">[ <a href="#top">Top</a> ]</div><br />
</div><br />

        <div class="credit">
		    <hr />
		    Documentation generated on Sun, 11 Apr 2010 22:12:34 -0500 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>